package cn.com.api.service.impl;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiNews;
import cn.com.api.entity.ApiT_city;
import cn.com.api.mapper.ApiNewsMapper;
import cn.com.api.service.ApiNewsService;

@Service
public class ApiNewsServiceImpl implements ApiNewsService {
	@Autowired
	private ApiNewsMapper apiNewsMapper;

	@Override
	public List<ApiNews> selectApiNews() {
		List<ApiNews> list = apiNewsMapper.selectApiNews();
		return list;
	}

	// 广告位
	@Override
	public List<ApiNews> findNewsAd(@Param("ctype") String ctype,
			@Param("city_id") Integer city_id) {
		List<ApiNews> list = apiNewsMapper.findNewsAd(ctype, city_id);
		return list;
	}

	// 关于我们
	@Override
	public List<ApiNews> ApiAboutus(@Param("ctype") String ctype) {
		return apiNewsMapper.ApiAboutus(ctype);
	}

	// 帮助中心
	@Override
	public List<ApiNews> help(@Param("ctype") String ctype) {
		return apiNewsMapper.help(ctype);
	}

	// 查看帮助内容
	@Override
	public List<ApiNews> helpContent(Integer rid) {
		// TODO Auto-generated method stub
		return apiNewsMapper.helpContent(rid);
	}
}
